﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Hydra.Shell.Attributes;
using Hydra.Shell.Interfaces;

namespace Hydra.UrlMon.Interfaces
{
    public interface IInternetSession
    {
        /// <summary>Registers a temporary pluggable namespace handler on the current process.</summary>
        /// <remarks>This method only registers a pluggable namespace handler on the current process. No other processes will be affected by this method.
        /// An application can register a pluggable namespace handler for a particular period of time when it wants to handle requests for some protocols by calling IInternetSession::RegisterNameSpace. If ppwzPatterns and cPatterns are NULL, the registered pluggable namespace handler will be called for all protocol requests. This method can be called multiple times using the same interface to register the different namespaces it wants to handle.</remarks>
        /// <param name="pCF">
        /// Pointer to an IClassFactory interface where an IInternetProtocol object can be created.</param>
        /// <param name="rclsid">
        /// Reference to the pluggable namespace handler.</param>
        /// <param name="pwzProtocol">
        /// String value that contains the protocol to be handled.</param>
        /// <param name="cPatterns">
        /// Unsigned long integer that indicates the number of elements in the ppwzPatterns parameter.</param>
        /// <param name="ppwzPatterns">
        /// Array of strings that contain the patterns the handler will be used for.</param>
        /// <param name="dwReserved">
        /// Reserved. Must be set to 0.</param>
        void RegisterNameSpace(
            IClassFactory pCF,
            ref Guid rclsid,
            string pwzProtocol,
            int cPatterns,
            ref string ppwzPatterns,
            int dwReserved);

        /// <summary>Unregisters a temporary pluggable namespace handler.</summary>
        /// <param name="pCF">
        /// Address of the IClassFactory interface that created the handler.</param>
        /// <param name="pszProtocol">
        /// Address of a string value that contains the protocol that was handled.</param>
        void UnregisterNameSpace(
            IClassFactory pCF,
            string pszProtocol);

        /// <summary>Registers a temporary pluggable MIME filter on the current process.</summary>
        /// <remarks>This method only registers a pluggable MIME filter on the current process. No other processes will be affected by this method.
        /// An application can register a pluggable MIME filter for a particular period of time when it wants to handle requests for some MIMEs by calling IInternetSession::RegisterMimeFilter. This method can be called multiple times using the same interface to register the different MIME types it wants to handle.</remarks>
        /// <param name="pCF">
        /// Address of an IClassFactory interface where an IInternetProtocol object can be created.</param>
        /// <param name="rclsid">
        /// Reference to the pluggable MIME handler.</param>
        /// <param name="pwzType">
        /// String value that contains the MIME to register.</param>
        void RegisterMimeFilter(
            IClassFactory pCF,
            ref Guid rclsid,
            string pwzType);

        /// <summary>Unregisters a temporary pluggable MIME filter.</summary>
        /// <param name="pCF">
        /// Address of the IClassFactory interface that created the filter.</param>
        /// <param name="pwzType">
        /// String value that indicates the MIME that the filter was handling.</param>
        void UnregisterMimeFilter(
            IClassFactory pCF,
            string pwzType);

        /// <summary>Not currently implemented.</summary>
        void CreateBinding(
            IntPtr pbc,
             string szUrl,
             object pUnkOuter,
             out object ppunk,
             out IInternetProtocol ppOInetProt,
            int dwOption);

        /// <summary>Not currently implemented.</summary>
        void SetSessionOption(
            int dwOption,
             IntPtr pBuffer,
            int dwBufferLength,
            int dwReserved);

        /// <summary>Not currently implemented.</summary>
        void GetSessionOption(
            int dwOption,
             IntPtr pBuffer,
             ref int pdwBufferLength,
            int dwReserved);
    }
}
